/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jl.tools.stkeditor.generate;

import com.jl.tools.stkeditor.exception.DataNotMatchCodingScheamException;

import java.util.List;

/**
 *
 * @author LuHongjun
 */
public class AddSpace extends CodeDect {

    String space = "";

    public AddSpace(Code code, int len) {
        this.code = code;
        for(int i = 0 ; i < len ; i++){
            this.space += " ";
        }
    }

    @Override
	public List<String> getCode() throws DataNotMatchCodingScheamException {
        List<String> l = code.getCode();
        l.add(0, space);
        return l;
    }

    @Override
	public int getLength() {
        return code.getLength();
    }
}
